import request from '@/utils/request'

export function createChart(data) {
  return request({
    url: '/api/chart/add',
    method: 'post',
    data
  })
}

export function getLastChart(data) {
  return request({
    url: '/api/chart/getLastChart',
    method: 'post',
    data
  })
}

export function getChartPagination(data) {
  return request({
    url: '/api/chart/getChartPagination',
    method: 'post',
    data
  })
}

export function getUserChartNum(data) {
  return request({
    url: '/api/chart/getUserChartNum',
    method: 'post',
    data
  })
}
export function deleteChartById(data) {
  return request({
    url: '/api/chart/deleteChartById',
    method: 'post',
    data
  })
}

export function queryByChartName(data) {
  return request({
    url: '/api/chart/queryByChartName',
    method: 'post',
    data
  })
}

export function queryByChartId(data) {
  return request({
    url: '/api/chart/queryByChartId',
    method: 'post',
    data
  })
}

export function updateChartData(data) {
  return request({
    url: '/api/chart/updateChartData',
    method: 'post',
    data
  })
}

export function updateChartInfo(data) {
  return request({
    url: '/api/chart/updateChartInfo',
    method: 'post',
    data
  })
}

export function queryByChartStatus(data){
  return request({
    url: '/api/chart/queryRunningChart',
    method: 'post',
    data
  })
}
